package com.zf.yichat.model;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;

@Table(name = "st_answers")
public class StAnswers implements Serializable {


    // 错误答案
    public static final String CORRECT_FALSE = "0";
    // 正确答案
    public static final String CORRECT_TRUE = "1";

    @Id
    private Integer id;

    @Column(name = "question_id")
    private Integer questionId;

    private String number;

    private String answer;

    private String correct;

    @Column(name = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    private static final long serialVersionUID = 1L;

    public StAnswers(Integer id, Integer questionId, String number, String answer, String correct, Date createTime) {
        this.id = id;
        this.questionId = questionId;
        this.number = number;
        this.answer = answer;
        this.correct = correct;
        this.createTime = createTime;
    }

    public StAnswers() {
        super();
    }

    /**
     * @return id
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * @return question_id
     */
    public Integer getQuestionId() {
        return questionId;
    }

    /**
     * @param questionId
     */
    public void setQuestionId(Integer questionId) {
        this.questionId = questionId;
    }

    /**
     * @return number
     */
    public String getNumber() {
        return number;
    }

    /**
     * @param number
     */
    public void setNumber(String number) {
        this.number = number == null ? null : number.trim();
    }

    /**
     * @return question
     */
    public String getAnswer() {
        return answer;
    }

    /**
     * @param answer
     */
    public void setAnswer(String answer) {
        this.answer = answer == null ? null : answer.trim();
    }

    /**
     * @return correct
     */
    public String getCorrect() {
        return correct;
    }

    /**
     * @param correct
     */
    public void setCorrect(String correct) {
        this.correct = correct == null ? null : correct.trim();
    }

    /**
     * @return create_time
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * @param createTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}